<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html lang="pt-br">

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>ONG Digital - <?php echo $title_for_layout; ?></title>
	<?php 
		echo $html->css('default');
		echo $html->css('calendar');
		echo $javascript->link('prototype.js');
		echo $javascript->link('scriptaculous.js?load=effects');
		echo $javascript->link('calendar.js');
	?>
	
	<!--[if ie 6]>
      <style type="text/css">
      body{ padding:0; }
      #sideBar{ position:relative; right:-60px; }
      #container{ margin:0 30px; }
      </style>
    <![endif]-->
<script type="text/javascript">
function load()
{	
	var menu = document.getElementById('sideBar');
	var content = document.getElementById('wrapper');
	content.style.minHeight = (menu.offsetHeight + 5)+'px';
}
</script>
	
</head>

<body class='body' onload="load()">
<!--[if ie 6]><div id="container"><![endif]-->
<div id="header">
<div id="header_b">
	<div id="conteudoTitle">
		<div id="user" >

			<?php
			//echo $html->image('criancas_flavio.jpg',array('height'=>'30px','display'=>'inline','vertical-align'=>'bottom'));
			// Verifica se o usuario esta logado
			//echo $html->image('logos/entidades.jpg',array('style'=>'width:400px; float: left; margin-left:220px;'));
			if ($othAuth->sessionValid()) {
					$nome = $othAuth->user("name");
					$organization = $othAuth->getData("organization");
					if (!empty($organization['id'])) {
						echo $organization['nome'];
					} else {
						echo "Usuario sem unidade";
					}

					echo "<br>";
					echo $nome;
					echo "&nbsp;&nbsp;&nbsp;";
					echo $html->link("sair","/users/logout");
				}
				else {
					echo "Você não está logado.";
					echo " Clique ";
					echo $html->link("aqui","/users/login");
					echo " para acessar";
				}
			?>
		</div>
	</div>
</div>
</div>

<div>
<div id="wrapper">
<div id="wrapperEnd">
	<div id="content">
		<?php echo $content_for_layout;	?>
	</div>
</div>
</div>
<div id="navigation">
</div>
<?php
	if ($othAuth->sessionValid()) {
?>
	<div id="sideBar">
		<?php echo $this->renderElement('mainMenu'); ?>
	</div>
<?php
	}
?>
</div>

<div id="footer"><p>Desenvolvido por Evandro Ramos, Flávio Kubota e Vagner de Sousa</p></div>
<!--[if ie 6]></div><![endif]-->

</body>

</html>
